{include file="public/head"}
<style>
    .m-button {
        padding: 0 0.24rem;
    }

    .btn-block {
        text-align: center;
        position: relative;
        border: none;
        pointer-events: auto;
        width: 100%;
        display: block;
        font-size: 1rem;
        height: 2.5rem;
        line-height: 2.5rem;
        margin-top: 0.5rem;
        border-radius: 3px;
    }

    .btn-primary {
        background-color: #04BE02;
        color: #FFF;
    }

    .btn-warning {
        background-color: #FFB400;
        color: #FFF;
    }
    .mask-black {
        background-color: rgba(0, 0, 0, 0.6);
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -ms-flex-align: center;
        align-items: center;
        z-index:999;
    }

    .m-actionsheet {
        text-align: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background-color: #EFEFF4;
        -webkit-transform: translate(0, 100%);
        transform: translate(0, 100%);
        -webkit-transition: -webkit-transform .3s;
        transition: -webkit-transform .3s;
        transition: transform .3s;
        transition: transform .3s, -webkit-transform .3s;
    }
    .actionsheet-toggle {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
    }
    .actionsheet-item {
        display: block;
        position: relative;
        font-size: 0.8rem;
        color: #555;
        height: 2rem;
        line-height: 2rem;
        background-color: #FFF;
    }
    .actionsheet-item:after {
        content: '';
        position: absolute;
        z-index: 2;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        border-bottom: 1px solid #D9D9D9;
        -webkit-transform: scaleY(0.5);
        transform: scaleY(0.5);
        -webkit-transform-origin: 0 100%;
        transform-origin: 0 100%;
    }
    .actionsheet-action {
        display: block;
        margin-top: .15rem;
        font-size: 0.8rem;
        color: #555;
        height:3rem;
        line-height: 3rem;
        background-color: #FFF;
        position:absolute;
        top:10px;
        right:0;
    }

</style>
<body>
<header class="aui-header-default aui-header-fixed aui-header-bg">
    <a href="javascript:history.back(-1)" class="aui-header-item">
        <i class="aui-icon aui-icon-back-white"></i>
    </a>
    <div class="aui-header-center aui-header-center-clear">

        <div class="aui-header-center-logo">商品详情
<!--            <div id="scrollSearchPro">-->
<!--                <span class="current">商品</span>-->
<!--                <span>评价</span>-->
<!--                <span>详情</span>-->
<!--            </div>-->
        </div>
    </div>
    <a href="javascript:;" class="aui-header-item-icon select"    style="min-width:0;">
<!--        <i class="aui-icon aui-icon-share-pd selectVal" onselectstart="return false"></i>-->
<!--        <div class="aui-header-drop-down selectList">-->
<!--            <div class="aui-header-drop-down-san"></div>-->
<!--            <div class="">-->
<!--                <p class="" onclick="location='http://www.a-ui.cn/'" >消息</p>-->
<!--                <p class="" onclick="location='index.html'">首页</p>-->
<!--                <p class="" onclick="location='index.html'">帮助</p>-->
<!--                <p class="" onclick="location='index.html'">分享</p>-->
<!--            </div>-->
<!--        </div>-->
    </a>
</header>
<div class="aui-banner-content aui-fixed-top" data-aui-slider>
    <div class="aui-banner-wrapper">
        {volist name="$GoodsInfo.album" id="v"}
        <div class="aui-banner-wrapper-item">
            <a href="#">
                <img src="{$v}">
            </a>
        </div>
        {/volist}
    </div>
    <div class="aui-banner-pagination"></div>

</div>
<div class="aui-product-content">
    <div class="aui-real-price clearfix">
            {if condition="$GoodsInfo['goods_type'] eq 3"}
			<span>
				<i>￥</i>{if condition="$UserInfo.level eq 1"}{$GoodsInfo.price}{elseif condition="$UserInfo.level eq 2"}{$GoodsInfo.hyprice}{elseif condition="$UserInfo.level eq 3"}{$GoodsInfo.dpprice}{elseif condition="$UserInfo.level eq 4"}{$GoodsInfo.qxprice}{elseif condition="$UserInfo.level eq 5"}{$GoodsInfo.sjprice}{elseif condition="$UserInfo.level eq 6"}{$GoodsInfo.shprice}{/if}
			</span>
			{else/}
			<span><i>￥</i>{$GoodsInfo['price']}</span>
			{/if}
		{if condition="$GoodsInfo['goods_type'] eq 3"}
        <del>
            {if condition="$UserInfo.level gt 0 "}
            <span class="aui-font-num">零售价￥{$GoodsInfo.price}</span>
            {if condition="$UserInfo.level gt 1 "}
            <span class="aui-font-num">会员价￥{$GoodsInfo.hyprice}</span>
            {if condition="$UserInfo.level gt 2 "}
            <span class="aui-font-num">店铺价￥{$GoodsInfo.dpprice}</span>
            {if condition="$UserInfo.level gt 4 "}
            <span class="aui-font-num">区县价￥{$GoodsInfo.qxprice}</span>
            {if condition="$UserInfo.level gt 5 "}
            <span class="aui-font-num">市价￥{$GoodsInfo.sjprice}</span>
            {/if}
            {/if}
            {/if}
            {/if}
            {/if}
        </del>
        {/if}
        
        <div class="aui-settle-choice">
            <!--<span>炁点可抵:{$GoodsInfo.proportion*100}%</span>-->
        </div>
    </div>
    <div class="aui-product-title">
        <h2>
            {$GoodsInfo.name} 
            <!--拼团显示已参与-->
            {if condition="$GoodsInfo['goods_type'] eq 5"}
                (已拼{$ptinfo.can_people}人)
            {/if}
        </h2>
        <p>
            {$GoodsInfo.introduction}
            {if condition="$GoodsInfo['goods_type'] eq 5"}
                <span style="color:red">(还差{$ptinfo.pt_people-$ptinfo.can_people}人拼成)</span>
            {/if}
        </p>
    </div>
<!--    <div class="aui-product-boutique clearfix">-->
<!--        <img src="__STATIC__/User/img/icon/icon-usa.png" alt="">-->
<!--        <span class="aui-product-tag-text">美国品牌</span>-->
<!--        <img src="__STATIC__/User/img/icon/icon-sj.png" alt="">-->
<!--        <span class="aui-product-tag-text">精选商家</span>-->
<!--    </div>-->
<!--    <div class="aui-product-strip">-->
<!--        <img src="__STATIC__/User/img/bg/ssy.jpg" alt="">-->
<!--    </div>-->
    <div class="aui-product-coupon">
        <a href="#" class="aui-address-cell aui-fl-arrow aui-fl-arrow-clear">
            <div class="aui-address-cell-bd">单位</div>
            <div class="aui-address-cell-ft">{$GoodsInfo.unit}</div>
        </a>
        <a href="#" class="aui-address-cell aui-fl-arrow aui-fl-arrow-clear">
            <div class="aui-address-cell-bd">运费</div>
            <div class="aui-address-cell-ft">{if condition="$GoodsInfo.is_bao eq 1"}包邮{else/}自理{/if}</div>
        </a>
        <a href="#" class="aui-address-cell aui-fl-arrow aui-fl-arrow-clear">
            <div class="aui-address-cell-bd">说明</div>
            <div class="aui-address-cell-ft">假一赔十</div>
        </a>
    </div>
    <div class="aui-dri"></div>
    <div class="aui-slide-box">
        <div class="aui-slide-list">
            <ul class="aui-slide-item-list">
                {volist name="GoodsList" id="gv"}
                <li class="aui-slide-item-item">
                    <a href="{:url('Goods/GoodsDetail',array('goods_id'=>$gv.id))}" class="v-link">
                        <img class="v-img" src="{$gv.logo_url}">
                        <p class="aui-slide-item-title aui-slide-item-f-els">{$gv.name}</p>
                        <p class="aui-slide-item-info">
                            <span class="aui-slide-item-price">¥{$gv.price}</span>
                        </p>
                    </a>
                </li>
                {/volist}
            </ul>
        </div>

    </div>
    <div class="aui-dri"></div>
    <div class="aui-product-pages">
        <div class="aui-product-pages-title">
            <h2>图文详情</h2>
        </div>
        <div class="aui-product-pages-img">
            {$GoodsInfo.detail}
        </div>
    </div>
</div>

<footer class="aui-footer-product">

    <!--总数量小于销售量  抢完了-->
    {if condition="$GoodsInfo.mnum elt $GoodsInfo.sellnum && $GoodsInfo.goods_type eq 4"}
    <div id="over_1" class="aui-footer-product-fixed " style="background: gray;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem">
        已抢完
    </div>
    <!--结束时间 小于 现在时间   结束了-->
    {elseif condition="$GoodsInfo.etime elt $nowtime && $GoodsInfo.goods_type eq 4"}
    <div id="over_2" class="aui-footer-product-fixed " style="background: gray;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem">
        已结束
    </div>
    <!--开始时间 大于  现在时间   没开始-->
    {elseif condition="$GoodsInfo.btime egt $nowtime && $GoodsInfo.goods_type eq 4"}
    <div id="over_3" class="aui-footer-product-fixed " style="background: gray;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem">
        未开始 {:date('m月d H:i:s',$GoodsInfo.btime)} 至 {:date('m月d H:i:s',$GoodsInfo.etime)}
    </div>
    <!--开始抢购-->
    {elseif condition="$GoodsInfo.goods_type eq 4"}
    <div id="over_4" class="aui-footer-product-fixed " style="background: #FF0000;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem;">
        <div class="aui-footer-product-fixed " style="background: #FF0000;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem;width: 70%;text-align: center"  id="times">

        </div>
        <a href="{:url('Order/OrderFound',array('goods_id'=>$GoodsInfo.id))}" style="display: flex;align-items: center;justify-content: flex-end">
            <div style="padding:.1rem 2rem;background: #fc6248">
                立即购买
            </div>
        </a>
    </div>
    <div id="over_4_1" class="aui-footer-product-fixed " style="background: gray;display: none;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem">
        已结束
    </div>
    {elseif condition="$GoodsInfo.goods_type eq 5"}
    <a href="{:url('Order/OrderFound',array('goods_id'=>$GoodsInfo.id,'pt_id'=>$pt_id))}">
    <div class="aui-footer-product-fixed " style="background: #FF0000;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem">
        立即参团
    </div>
    </a>
    {else/}
    <a href="{:url('Order/OrderFound',array('goods_id'=>$GoodsInfo.id))}">
    <div class="aui-footer-product-fixed " style="background: #FF0000;font-size: .8rem;font-weight: 600;color: white;line-height: 3rem">
        立即购买
    </div>
    </a>
    {/if}
</footer>

<script src="__STATIC__/User/js/jquery.min.js"></script>
<script src="__STATIC__/User/js/aui.js"></script>
<script src="__STATIC__/User/js/aui-down.js"></script>

<script>
function _fresh()
{
 var endtime=new Date("{$time}");
 var nowtime = new Date();
 var leftsecond=parseInt((endtime.getTime()-nowtime.getTime())/1000);
 __d=parseInt(leftsecond/3600/24);
 __h=parseInt((leftsecond/3600)%24);
 __m=parseInt((leftsecond/60)%60);
 __s=parseInt(leftsecond%60);
var c=new Date();
var q=((c.getMilliseconds())%10);
 document.getElementById("times").innerHTML=__d+"天 "+__h+"小时"+__m+"分"+__s+"秒";
 if(leftsecond<=0){
 // document.getElementById("times").innerHTML="抢购已结束";
 clearInterval(sh);
 $('#over_4').css('display','none');
 $('#over_4_1').css('display','block');
 }
}
_fresh()
var sh;
sh=setInterval(_fresh,100);

</script>

<script type="text/javascript">
    $(function () {
        //绑定滚动条事件
        //绑定滚动条事件
        $(window).bind("scroll", function () {
            var sTop = $(window).scrollTop();
            var sTop = parseInt(sTop);
            if (sTop >= 100) {
                if (!$("#scrollSearchPro").is(":visible")) {
                    try {
                        $("#scrollSearchPro").slideDown();
                    } catch (e) {
                        $("#scrollSearchPro").show();
                    }
                }
            }
            else {
                if ($("#scrollSearchPro").is(":visible")) {
                    try {
                        $("#scrollSearchPro").slideUp();
                    } catch (e) {
                        $("#scrollSearchPro").hide();
                    }
                }
            }
        });
    })
</script>

<script>
    /**
     * Javascript API调用ActionSheet
     */
    !function ($) {
        var $myAs = $('#J_ActionSheet');

        $('#J_ShowActionSheet').on('click', function () {
            $myAs.actionSheet('open');
        });

        $('#J_Cancel').on('click', function () {
            $myAs.actionSheet('close');
        });

    }(jQuery);
</script>


</body>
</html>